#include <iostream>
#include <string.h>
using namespace std;

#include "list.h"
#include "vector.h"
#include "reverse_iterator.h"

void test()
{
	ly::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);

	for (size_t i = 0; i < v.size(); i++)
	{
		cout << v[i] << ' ';
	}
	cout << endl;

	ly::vector<int>::iterator pos = v.begin() + 2;
	v.insert(pos, 30);
	for (size_t i = 0; i < v.size(); i++)
	{
		cout << v[i] << ' ';
	}
	cout << endl;
	v.erase(pos);
	for (size_t i = 0; i < v.size(); i++)
	{
		cout << v[i] << ' ';
	}
	cout << endl;

	ly::vector<int> vv(10);
	for (size_t i = 0; i < vv.size(); i++)
	{
		cout << vv[i] << ' ';
	}
	cout << endl;
}

void test1()
{
	ly::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);

	ly::vector<int>::iterator it = v.begin();
	while (it != v.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;

	ly::vector<int>::reverse_iterator  rit = v.rbegin();
	while (rit != v.rend())
	{
		cout << *rit << " ";
		++rit;
	}
	cout << endl;
}

int main()
{
	test1();

	return 0;
}